<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>

<title>My JSP 'add.jsp' starting page</title>
<link href="style/bootstrap.css" rel="stylesheet">
<style type="text/css">
.control-group {
	padding-left: 25%;
}

.container {
	padding-left: 25%;
}
</style>

<script type="text/javascript" src="script/jquery.js"></script>
<link href="style/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="script/bootstrap-modal.js"></script>
<script type="text/javascript" src="js_ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="js_ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="js_ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js_ui/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="script/bootstrap.js"></script>


</head>

<body>

	<div class="navbar">
		<div class="navbar-inner">
			<div class="container" style="width: auto;">
				<a class="btn btn-navbar" data-target=".nav-collapse"
					data-toggle="collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> </a> <a
					class="brand" href="#">品竹缘健康生活馆</a>
				<div class="nav-collapse">
					<ul class="nav">
						<li class="active"><a href="#">首页</a>
						</li>
						<li class="active"><a href="#">用户管理</a>
						</li>
					</ul>

					<ul class="nav pull-right">
					</ul>

					<ul class="nav pull-right">
						<li><a href="#">${juese }</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>

	<div class="control-group">
		<form id="form" action="add.jspx?task=add&info=${user.info }"
			method="post">

			<div>添加新纪录</div>
			<hr />
			<label class="control-label" for="focusedInput"> 日期 </label>
			<div class="controls">
				<input id="datepicker" class="input-xlarge focused" type="text"
					name="time" value="">
			</div>

			<label class="control-label" for="focusedInput"> 单位 </label>
			<div class="controls">
				<input id="focusedInput2" class="input-xlarge focused" type="text"
					name="danwei" value="">
			</div>

			<label class="control-label" for="focusedInput"> 导游 </label>
			<div class="controls">
				<input id="focusedInput3" class="input-xlarge focused" type="text"
					name="tr" value="">
			</div>

			<label class="control-label" for="focusedInput"> 人数 </label>
			<div class="controls">
				<input id="focusedInput4" class="input-xlarge focused" type="text"
					name="num" value="">
			</div>

			<label class="control-label" for="focusedInput"> 客源地 </label>
			<div class="controls">
				<input id="focusedInput5" class="input-xlarge focused" type="text"
					name="from" value="">
			</div>

			<label class="control-label" for="focusedInput"> 销售额 </label>
			<div class="controls">
				<input id="focusedInput6" class="input-xlarge focused" type="text"
					name="total" value="">
			</div>

			<input id="loginBtn" type="button" class="btn btn-primary" value="提交" />
			<input id="lnBtn" type="button" class="btn" value="取消" />
		</form>
	</div>

	


	<%--确定添加的隐藏域 --%>
	<div id="saveOK" class="modal hide fade" style="display: none;">
		<div class="modal-header">
			<a class="close" data-dismiss="modal">×</a>
			<h3>确定添加吗</h3>
		</div>
		<div class="modal-body">
			<div class="control-group">
				<form id="form1" action="search.jspx?task=search" method="post">
					<label class="control-label" for="focusedInput"> 日期 </label>
					<div class="controls">
						<div class="input">
							<input id="time_disabledInput" class="xlarge disabled"
								type="text" disabled="" placeholder="zzz" size="30"
								name="disabledInput" value="">
						</div>

					</div>

					<label class="control-label" for="focusedInput"> 单位 </label>
					<div class="controls">
						<div class="input">
							<input id="danwei_disabledInput" class="xlarge disabled"
								type="text" disabled="" placeholder="zzz" size="30"
								name="disabledInput" value="">
						</div>

					</div>

					<label class="control-label" for="focusedInput"> 导游 </label>
					<div class="controls">
						<div class="input">
							<input id="tr_disabledInput" class="xlarge disabled" type="text"
								disabled="" placeholder="zzz" size="30" name="disabledInput"
								value="">
						</div>

					</div>

					<label class="control-label" for="focusedInput"> 人数 </label>
					<div class="controls">
						<div class="input">
							<input id="num_disabledInput" class="xlarge disabled" type="text"
								disabled="" placeholder="zzz" size="30" name="disabledInput"
								value="">
						</div>

					</div>

					<label class="control-label" for="focusedInput"> 客源地 </label>
					<div class="controls">
						<div class="input">
							<input id="from_disabledInput" class="xlarge disabled"
								type="text" disabled="" placeholder="qqqq" size="30"
								name="disabledInput" value="">
						</div>

					</div>

					<label class="control-label" for="focusedInput"> 销售额 </label>
					<div class="controls">
						<div class="input">
							<input id="total_disabledInput" class="xlarge disabled"
								type="text" disabled="" placeholder="zzz" size="30"
								name="disabledInput" value="vvvv">
						</div>

					</div>
				</form>
			</div>
		</div>
		<div class="modal-footer">
			<a id="isSave" class="btn btn-primary" href="javascript:void(0)">添加</a>
			<a class="btn" data-dismiss="modal" href="#">Close</a>
		</div>
	</div>

</body>

<script type="text/javascript">
var xmlHttp;
  		
  		$("#datepicker").datepicker({
  			
			changeMonth : true,
			option : $.datepicker.regional["zh-CN"],
		});
  		
  			$("#loginBtn").click(function() {
  		
  			var datepickername = document.getElementById("datepicker").value;
	  		var focusedInput2 = document.getElementById("focusedInput2").value;
  			var focusedInput3 = document.getElementById("focusedInput3").value;
  			var focusedInput4= document.getElementById("focusedInput4").value;
  			var focusedInput5 = document.getElementById("focusedInput5").value;
  			var focusedInput6 = document.getElementById("focusedInput6").value;
  			
  			$("#saveOK").modal("show");
  			
  			document.getElementById("time_disabledInput").value = datepickername;
			document.getElementById("danwei_disabledInput").value = focusedInput2;
			document.getElementById("tr_disabledInput").value = focusedInput3;
			document.getElementById("from_disabledInput").value = focusedInput5;
			document.getElementById("num_disabledInput").value = focusedInput4;
			document.getElementById("total_disabledInput").value = focusedInput6;
	  			
  			});
  		$("#isSave").click(function() {
			$("#isSave").modal("hide");
			$("#form").submit();
		});
  		
</script>

</html>
